package com.example.epidemic_assistant.util;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import java.io.File;

public class FileUtil {

    /**
     * 图片地址转换图片
     * @param path 地址路径
     * @return 图片
     */
    public static Bitmap ImagePathToBitmap(String path) {
        if (path != null) {
            File file = new File(path);
            if (file.exists()) {
                return BitmapFactory.decodeFile(path);
            }
        }
        return null;
    }
}
